import Vue from 'vue'
import store from '@/store'

Vue.directive('permission', {
  inserted(el, binding) {
    const buttons = store.state.menus.buttons
    if (buttons.includes('*:*:*')) {
      console.log('all')
    } else {
      if (!buttons.includes(binding.value)) {
        el.remove()
      }
    }
  }
})


